<template>
	<view>
		<view class="success">
			<view class="su">支付成功</view>
			<view class="fu">私人律师团期待为您服务</view>
		</view>
		<view class="btn" @click="navTo">马上咨询</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				options: {}
			}
		},
		onLoad(options) {
			this.options = options
		},
		onBackPress(event) {
			console.log(event)
			if (event.from == 'backbutton' || event.from == 'navigateBack') {
				uni.switchTab({url: '/pages/user/user'})
			}
			return true
		},
		methods: {
			navTo() {
				console.log(1)
				uni.navigateTo({url: `/pages/lawyer/lawyer-detail?id=${this.options.id}`})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.success {
		text-align: center;
		padding-top: 50%;
		.su {
			font-size: 50rpx;
			font-weight: 800;
			line-height: 38rpx;
			letter-spacing: 1rpx;
			color: #2c313c;
		}
		.fu {
			font-size: 28rpx;
			color: #2c313c;
			padding-top: 5%;
		}
	}
	.btn {
		margin: 20% auto 0;
		width: 300rpx;
		height: 90rpx;
		background-color: #ecedf5;
		border-radius: 45rpx;
		text-align: center;
		line-height: 90rpx;
		font-size: 34rpx;
		color: #596579;
		&:active {
			opacity: .9;
		}
	}
</style>
